<?php

//配置文件

use think\Env;

return [
    'exception_handle'        => '\\app\\api\\library\\ExceptionHandle',

    'google' => [
        'client_id'     => Env::get('google.client_id', false),
        'client_secret' => Env::get('google.client_secret', false),
        'redirect'      => Env::get('google.redirect', ''),

        'guzzle' => [
            'proxy' => Env::get('google.proxy', false),
            'timeout' => 10,
        ],
    ],

    'facebook' => [
        'app_id'     => Env::get('facebook.app_id', false),
        'app_secret' => Env::get('facebook.app_secret', false),
        'redirect'   => Env::get('facebook.redirect', ''),

        'guzzle' => [
            'proxy' => Env::get('facebook.proxy', false),
            'timeout' => 10,
        ],
    ],

    'paypal' => [
        'mode' => Env::get('paypal.mode', 'sandbox'), // sandbox或live
        'client_id' => Env::get('paypal.client_id', '你的Client ID'),
        'client_secret' => Env::get('paypal.client_secret', '你的Secret'),
        'return_url' => Env::get('paypal.return_url', 'https://localhost/paypal/return'),
        'cancel_url' => Env::get('paypal.cancel_url', 'https://localhost/paypal/cancel'),
    ],

    'orange' =>  [
        'mode' => Env::get('orange.mode', 'sandbox'), // sandbox或production
        'api_key' => Env::get('orange.api_key', '你的API密钥'),
        'merchant_id' => Env::get('orange.merchant_id', '你的商户ID'),
        'terminal_id' => Env::get('orange.terminal_id', '你的终端ID'),
        'country' => Env::get('orange.country', 'SN'), // 国家代码，如CI=科特迪瓦, SN=塞内加尔
        'currency' => Env::get('orange.currency', 'XOF'), // 货币代码，西非法郎
        'api_endpoints' => [
            'sandbox' => [
                'initiate' => 'https://api.orange.com/orange-money-webpay/dev/v1/webpayment',
                'status' => 'https://api.orange.com/orange-money-webpay/dev/v1/webpayment/{transactionId}/status'
            ],
            'production' => [
                'initiate' => 'https://api.orange.com/orange-money-webpay/prod/v1/webpayment',
                'status' => 'https://api.orange.com/orange-money-webpay/prod/v1/webpayment/{transactionId}/status'
            ]
        ],
        'return_url' => 'https://你的域名/orange/return',
        'notify_url' => 'https://你的域名/orange/notify'
    ],
];
